using TCC.Framework;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

namespace TCC.Framework
{
    public class MinTools
    {
        [MenuItem("GameObject/TCC/CopyPath", priority =0)]
        public static void CopyGameObjectPath()
        {
            Transform target = Selection.activeTransform;
            string path = target.name;
            while (target.parent!=null)
            {
                target = target.parent;
                path = target.name + "/" + path;
            }
            EditorGUIUtility.systemCopyBuffer = path;
        }
        

        [MenuItem("Assets/Create/ObjectData")]
        public static void CreateObjectData()
        {
            Texture texture = EditorGUIUtility.IconContent("cs Script Icon").image;
            CreateScriptFromTemplate.Create<CreateObjectDataScript>(EditorConfigFile.ObjectScriptTemolatePath, "NweObjectData", texture as Texture2D);
        }
    }
}